 $(function() {
     // // 专题网站的轮播
     var timerbq = null;
     var $pic = $('#pic')
     var w = $pic.find('img').width()
     $pic.html($pic.html() + $pic.html())
     var i = 0
     var m = 3
     $('.next').click(function() {
         ztwz()
     })
     $('.prve').click(function() {
         ztwz1()
     })

     function ztwz() {
         i++
         $pic.animate({ 'left': -i * w + 'px' }, function() {
             if (i == 3) {
                 i = 0
                 $pic.css('left', 0)
             }
         })
     }

     function ztwz1() {
         m--
         $pic.animate({ 'left': -m * w + 'px' }, function() {
             if (m == 0) {
                 m = 3
                 $pic.css('left', '-1200px')
             }
         })
     }

     //     timerbq=setInterval(ztwz,1000)
     //快速通道
     $('.kstd_list>li').mouseover(function() {
         $(this).css("backgroundColor", 'lightskyblue')
     })
     $('.kstd_list>li').mouseout(function() {
         $(this).css("backgroundColor", '#E1EFFE')
     })

     //第二个tab栏
     $(".Tab2 li").mouseover(function() {
             $(this).addClass("current").siblings().removeClass("current");
             var index = $(this).index();
             $(".contentda>.content").eq(index).addClass("curr").siblings().removeClass("curr");
         })
         //新闻字变色
     $(".newsList a").mouseover(function() {
         $(this).css("color", "brown")
     })
     $(".newsList a").mouseout(function() {
         $(this).css("color", "#333333")
     })

 })


 //大轮播
 window.onload = function() {
     var oright = document.getElementById("rightyou");
     var oleft = document.getElementById("leftzuo");
     var oimg = document.getElementById("imgd");
     var n = 0;
     var oli = document.getElementById("dotd").getElementsByTagName("li")
     var timerda = null;
     var arr = ["img/banner_01.jpg", "img/banner_02.jpg", "img/banner_03.jpg", "img/banner_04.jpg", "img/banner_05.jpg", "img/banner_06.jpg"];

     oright.onclick = function() {
         clearInterval(timerda);
         auto()
     }
     oleft.onclick = function() {
         clearInterval(timerda);
         auto1()
     }
     timerda = setInterval(auto, 1000)

     function auto() {
         n++;
         if (n > 5) {
             n = 0;
         }
         oimg.src = arr[n];
         for (let i = 0; i < oli.length; i++) {
             oli[i].className = ""
         }
         oli[n].className = "actived"
     }

     function auto1() {
         n--;
         if (n < 0) {
             n = 5;
         }
         oimg.src = arr[n];
         for (let i = 0; i < oli.length; i++) {
             oli[i].className = ""
         }
         oli[n].className = "actived"
     }
     oimg.onmouseover = function() {
         clearInterval(timerda);

     }
     oimg.onmouseout = function() {
         timerda = setInterval(auto, 1000)

     }
     for (let i = 0; i < oli.length; i++) {
         oli[i].onmouseover = function() {
             clearInterval(timerda)
             oimg.src = arr[i]
             for (let i = 0; i < oli.length; i++) {
                 oli[i].className = '';
             }
             oli[i].className = 'actived'
             n = i;
         }

     }





     // 小轮播
     var oimg1 = document.getElementById("imgnew");
     var q = 0;
     var ali = document.getElementById("dot").getElementsByTagName("li")
     var timerxiao = null;
     var bddtitle = $('.newzi .bd_tilte')
     var newzia = $('.newzi .leftnews')
     var arr1 = ["img/new01.jpg", "img/new02.jpg", "img/new03.jpg", "img/new04.jpg", "img/new05.jpg"];
     oimg1.onmouseover = function() {
         clearInterval(timerxiao);

     }
     oimg1.onmouseout = function() {
         timerxiao = setInterval(autoxiao, 1000)
     }
     timerxiao = setInterval(autoxiao, 1000)

     function autoxiao() {
         q++;
         if (q > 4) {
             q = 0;
         }
         oimg1.src = arr1[q];
         for (let i = 0; i < ali.length; i++) {
             ali[i].className = ""
         }
         ali[q].className = "active"
         bddtitle.eq(q).addClass("newcurr").siblings().removeClass("newcurr")
     }
     for (let i = 0; i < ali.length; i++) {
         ali[i].onmouseover = function() {
             clearInterval(timerxiao)
             oimg1.src = arr1[i]
             for (let i = 0; i < ali.length; i++) {
                 ali[i].className = '';
             }
             ali[i].className = 'active'
             q = i;
             bddtitle.eq(q).addClass("newcurr").siblings().removeClass("newcurr")
         }
     }
     bddtitle.mouseover(function() {
         clearInterval(timerxiao)
     })
     bddtitle.mouseout(function() {
         timerxiao = setInterval(autoxiao, 1000)
     })
     newzia.mouseover(function() {
         $(this).css('color', 'brown')
     })
     newzia.mouseout(function() {
         $(this).css('color', '#333333')
     })
 }